Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use parameterInfo.Name when modelNameProvider.Name is null. #4700

Merged
merged 1 commit into from
Jul 17, 2020

Conversation

maliming
Copy link
Member

@maliming maliming commented Jul 9, 2020

Use Case:
GetIdentitySecurityLogListInput has an property named Action. ASPNET CORE's RouteValueProvider will bind the current method name to this Action property, but this is not expected, I specified it to get the value from the querystring.

[HttpGet]
public Task<PagedResultDto<IdentitySecurityLogDto>> GetListAsync([FromQuery]GetIdentitySecurityLogListInput input)
{
	return IdentitySecurityLogAppService.GetListAsync(input);
}
volo.abp.identity.identitySecurityLog.getList = function(input, ajaxParams) {
  return abp.ajax($.extend(true, {
	url: abp.appPath + 'api/identity/security-logs' + abp.utils.buildQueryString([{ name: 'startTime', value: startTime }, { name: 'endTime', value: endTime }, { name: 'applicationName', value: applicationName }, { name: 'identity', value: identity }, { name: 'action', value: action }, { name: 'userName', value: userName }, { name: 'clientId', value: clientId }, { name: 'correlationId', value: correlationId }, { name: 'sorting', value: sorting }, { name: 'skipCount', value: skipCount }, { name: 'maxResultCount', value: maxResultCount }]) + '',
	type: 'GET'
  }, ajaxParams));
};

The generated proxy script is incorrect(should be input.xxx), we need to make it use the correct param name.

@maliming maliming added this to the 3.1 milestone Jul 9, 2020
@hikalkan hikalkan merged commit 96c7ece into dev Jul 17, 2020
@hikalkan hikalkan deleted the maliming-patch-1 branch July 17, 2020 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants